package com.gg.hj.service.impl;
import com.gg.common.mapper.DFileMapper;
import com.gg.common.pojo.DFile;
import com.gg.hj.search.D_FileSearchView;
import com.gg.hj.service.D_FileService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class D_FileServiceImpl implements D_FileService {
    @Resource
    private DFileMapper fileMapper;

    @Override
    // TODO 查询制定安全库存配置单
    public D_FileSearchView<DFile> queryProductConfigureAllService(D_FileSearchView<DFile> pageView) throws Exception {
        PageHelper.startPage(pageView.getPageNum(),pageView.getPageSize());
        PageInfo<DFile> pageInfo = new PageInfo<DFile>(this.fileMapper.queryProductConfigureAll(pageView));
        pageView.setTotal(pageInfo.getTotal());
        pageView.setRows(pageInfo.getList());
        return pageView;
    }


}
